import request from '@/utils/request'

// 查询汽油类型列表
export function listOil(query) {
  return request({
    url: '/shop/oil/list',
    method: 'get',
    params: query
  })
}
// 查询加油站列表
export function listPetrol(query) {
  return request({
    url: '/shop/petrol/list1',
    method: 'get',
    params: query
  })
}

// 查询汽油类型详细
export function getOil(id) {
  return request({
    url: '/shop/oil/' + id,
    method: 'get'
  })
}

// 新增汽油类型
export function addOil(data) {
  return request({
    url: '/shop/oil',
    method: 'post',
    data: data
  })
}

// 修改汽油类型
export function updateOil(data) {
  return request({
    url: '/shop/oil',
    method: 'put',
    data: data
  })
}

// 删除汽油类型
export function delOil(id) {
  return request({
    url: '/shop/oil/' + id,
    method: 'delete'
  })
}
